home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / refex / ex69.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  304 b   |  17 lines

  1. Program Example69;
  2.  
  3. { Program to demonstrate the Swap function. }
  4. Var W : Word;
  5.     L : Longint;
  6.     
  7. begin
  8.   W:=$1234;
  9.   W:=Swap(W);
  10.   if W<>$3412 then 
  11.     writeln ('Error when swapping word !');
  12.   L:=$12345678;
  13.   L:=Swap(L);
  14.   if L<>$56781234 then 
  15.     writeln ('Error when swapping Longint !');
  16. end.
  17.